<?php
declare(strict_types=1);

namespace LowCode\Naive;

use LowCode\Naive;
use LowCode\Support\JsExp;
use LowCode\Traits\Props\HasClosable;
use LowCode\Traits\Props\HasDisabled;

/**
 * 组件 - 标签页 Tab
 * @method static static make(string|int|JsExp $name = null) Tab组件
 */
class Tab extends Naive
{

    use HasClosable, HasDisabled;

    /**
     * @param mixed|null $name
     */
    public function __construct(string|int|JsExp $name = null)
    {
        parent::__construct();
        $this->name($name);
    }

    /**
     * 必填，标签的名称
     * @param string|int|JsExp $name
     * @return $this
     */
    public function name(string|int|JsExp $name): static
    {
        return $this->prop('name', $name);
    }
}
